package org.gr.ias.common.entity;

import java.io.Serializable;

public class SysAuthority implements Serializable {
    /** 权限代码*/
    private String authorityCode;

    /** 权限名*/
    private String authorityName;

    /** 权限组id*/
    private String authorityGroupId;

    /** 排序号*/
    private Integer sequenceNumber;

    /** 是否是菜单(Y:是、N:否)*/
    private String isMenu;

    /** 菜单地址*/
    private String menuUrl;

    private static final long serialVersionUID = 1L;

    public String getAuthorityCode() {
        return authorityCode;
    }

    public void setAuthorityCode(String authorityCode) {
        this.authorityCode = authorityCode == null ? null : authorityCode.trim();
    }

    public String getAuthorityName() {
        return authorityName;
    }

    public void setAuthorityName(String authorityName) {
        this.authorityName = authorityName == null ? null : authorityName.trim();
    }

    public String getAuthorityGroupId() {
        return authorityGroupId;
    }

    public void setAuthorityGroupId(String authorityGroupId) {
        this.authorityGroupId = authorityGroupId == null ? null : authorityGroupId.trim();
    }

    public Integer getSequenceNumber() {
        return sequenceNumber;
    }

    public void setSequenceNumber(Integer sequenceNumber) {
        this.sequenceNumber = sequenceNumber;
    }

    public String getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(String isMenu) {
        this.isMenu = isMenu == null ? null : isMenu.trim();
    }

    public String getMenuUrl() {
        return menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl == null ? null : menuUrl.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysAuthority other = (SysAuthority) that;
        return (this.getAuthorityCode() == null ? other.getAuthorityCode() == null : this.getAuthorityCode().equals(other.getAuthorityCode()))
            && (this.getAuthorityName() == null ? other.getAuthorityName() == null : this.getAuthorityName().equals(other.getAuthorityName()))
            && (this.getAuthorityGroupId() == null ? other.getAuthorityGroupId() == null : this.getAuthorityGroupId().equals(other.getAuthorityGroupId()))
            && (this.getSequenceNumber() == null ? other.getSequenceNumber() == null : this.getSequenceNumber().equals(other.getSequenceNumber()))
            && (this.getIsMenu() == null ? other.getIsMenu() == null : this.getIsMenu().equals(other.getIsMenu()))
            && (this.getMenuUrl() == null ? other.getMenuUrl() == null : this.getMenuUrl().equals(other.getMenuUrl()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAuthorityCode() == null) ? 0 : getAuthorityCode().hashCode());
        result = prime * result + ((getAuthorityName() == null) ? 0 : getAuthorityName().hashCode());
        result = prime * result + ((getAuthorityGroupId() == null) ? 0 : getAuthorityGroupId().hashCode());
        result = prime * result + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
        result = prime * result + ((getIsMenu() == null) ? 0 : getIsMenu().hashCode());
        result = prime * result + ((getMenuUrl() == null) ? 0 : getMenuUrl().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", authorityCode=").append(authorityCode);
        sb.append(", authorityName=").append(authorityName);
        sb.append(", authorityGroupId=").append(authorityGroupId);
        sb.append(", sequenceNumber=").append(sequenceNumber);
        sb.append(", isMenu=").append(isMenu);
        sb.append(", menuUrl=").append(menuUrl);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}